package com.kfirszt.elearning.utils.generators;

import java.util.List;

import com.kfirszt.elearning.persistence.model.Answer;

public class OneChoiceGenerator implements Generator {

	@Override
	public String generate(List<Answer> answers) {
		StringBuilder stringBuilder = new StringBuilder();

		for (Answer a : answers) {
			stringBuilder.append("<input type=\"radio\" value=\"");
			stringBuilder.append(a.getValue());
			stringBuilder.append("\" name = \"answer\">");
			stringBuilder.append("<label>");
			stringBuilder.append(a.getValue());
			stringBuilder.append("</label>");
			stringBuilder.append("</br>");
		}
		return stringBuilder.toString();
	}
}
